package com.code.springboot3.model.dto;

import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.Pattern;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class UpdatePwdDto {

    @NotEmpty(message = "密码不能为空")
    @Pattern(regexp = "^\\S{5,16}$",message = "密码需要5-16位")
    private String old_pwd;
    @NotEmpty(message = "密码不能为空")
    @Pattern(regexp = "^\\S{5,16}$",message = "密码需要5-16位")
    private String new_pwd;
    @NotEmpty(message = "密码不能为空")
    @Pattern(regexp = "^\\S{5,16}$",message = "密码需要5-16位")
    private String re_pwd;
}
